﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Formboard.Resources
{
    public class Board
    {
        public enum BoardStatus
        {
            OPEN,
            FULL,
            CLOSED
        };

       // public int id;
        public String creation_date;
        public String name;
        public String owner;
        public String invitee;
        public String size;
        public BoardStatus status;
        public bool owner_white;
        public String url;

        public List<Move> moves;

        public Board(String name,String owner)
        {
            creation_date = "15/10/2011";
            this.name=name;
            this.owner=owner;
            this.size = "9x9";
            this.moves = new List<Move>();
           
        }
        public Board()
        {
            size = "9";
            this.moves = new List<Move>();
        }

        public String getIdFromUrl()
        {
            char[] sep = { '/' };
            return this.url.Split(sep).Last();
        }
    }
}
